package com.lyf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="轮播图对象", description="")
@TableName("slide_show")
public class SlideShow implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "轮播图id")
    @TableField("banner_id")
    private Integer bannerId;

    @ApiModelProperty(value = "添加人ID")
    @TableField("add_user")
    private Long addUser;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "添加时间")
    @TableField("add_time")
    private Date addTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField("update_user")
    private Long updateUser;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private Date updateTime;

    @ApiModelProperty(value = "轮播图标题")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "轮播图分类")
    @TableField("type")
    private Integer type;//1首页 2路线 3住宿 4景区 5保险

    @ApiModelProperty(value = "附近景点（住宿）")
    @TableField("scenic_spot_id")
    private Long scenicSpotId;

    @ApiModelProperty(value = "轮播图地址")
    @TableField("banner_url")
    private String bannerUrl;

    @ApiModelProperty(value = "首页轮播图类型")
    @TableField("home_type")
    private Integer homeType;//1路线 2住宿 3景区 4保险 5攻略


}
